import Vue from 'vue'
import App from './App.vue'
import { vuetify, i18n } from './plugins/vuetify'
import router from "./router/index";
import store from "./store/index";
import '@/common/styles/common.scss'
import './plugins/common'
import './plugins/message'
import './axios/methods'
window.addEventListener(Reflect.has(window, 'orientationchange') ? 'orientationchange' : 'resize', () => {
  store.commit('resizeWidth', document.body.clientWidth)
})

Vue.config.productionTip = false
router.beforeEach((to, from, next) => {
  /*路由发生改变修改页面的title */
  if (to.meta.title) {
    document.title = to.meta.title;
  }
  next();
});

new Vue({
  vuetify,
  i18n,
  router,
  store,
  render: h => h(App)
}).$mount('#app')
